package org.itheima.service.impl;

import org.itheima.mapper.ShouCangMapper;
import org.itheima.service.ShouCangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ShouCangServiceImpl implements ShouCangService {

    @Autowired
    private ShouCangMapper shouCangMapper;

    @Override
    public List<Map<String, Object>> shouCangFindById(String id) {
        return shouCangMapper.shouCangFindById(id);
    }

    @Override
    public void addShouCang(String name, String id, String oldPrice,String image,int tableId) {
        shouCangMapper.addShouCang(name, id, oldPrice, image,tableId);
    }

    @Override
    public void deleteShouCang(String name, String id) {
        shouCangMapper.deleteShouCang(name,id);
    }
}
